package com.lzy.system.organization.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.lzy.validator.StringMinMaxConstraint;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 角色
 * </p>
 *
 * @author lcc
 * @since 2022-08-13
 */
@TableName("sys_role")
@Data
@ApiModel(value = "角色", description = "")
public class SysRole implements Serializable {

    private static final long serialVersionUID = 4918679364316247614L;

    @ApiModelProperty("编号")
    @TableId(value = "ID", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("角色名称")
    @StringMinMaxConstraint(max = 50,min = 1,message = "角色名称长度在1-50之间")
    private String role_name;

    @ApiModelProperty("父id")
    private Long pid;

    @ApiModelProperty("类型1目录2角色")
    private Integer type;

}
